package algorithm;

public class leetcode_0055 {
    public boolean canJump(int[] nums) {
        int len=nums.length;
        int end=0;
        for(int i=0;i<len;++i){
            if(end>=len-1) return true;
            if(end<i) return false;
            end=Math.max(end,i+nums[i]);
        }
        return true;
    }
}
